<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        //1
        $pp = array ('1, ','2, ','3, ','4, ','5.') ;
        foreach ($pp as $n){
            echo $n ;
        } echo '<br>';     
        //2
        $a = array ('1,','2,','3,','4,','5,','6,','7,','8,','9,','0') ;
        rsort($a);
        foreach ($a as $m){
            echo $m ;
        } echo '<br>'.'<br>';  
        //3
        $m1 = 8;
        $m2 = 7;
        $m3 = 6;
        $m4 = 4;
        $media = ($m1 + $m2 + $m3 + $m4 ) / 4;
        echo  'Nota 1= '.$m1.'<br>'.
              'Nota 2= '.$m2.'<br>'.
              'Nota 3= '.$m3.'<br>'.
              'Nota 4= '.$m4.'<br>'.
              'Média= '.$media;
        
       // if ($media > 7)
         //   echo ', maior que 7, aprovado  <br>';
        //elseif ($media < 7)
          //  echo ', Menor que 7, reprovado  <br>';
        
        
        
        
        
        
        
        
        
        
        ?>
    </body>
</html>
